What is the command that is used in the Module Properties History Tab to restore the value of an attribute with everything, including pictures and OLEs?
|
Re: Restore Button Module Properties |
Re: Restore Button Module Properties SystemAdmin - Mon Jul 16 17:19:49 EDT 2012 Cheers, Peter |
Re: Restore Button Module Properties Peter_Albert - Tue Jul 17 04:08:52 EDT 2012 OK, you asked for the command used in the Object properties dialogue box. This is likely obj."Object Text" = richText hr.oldValue but still you have to get the correct history record as written above. |
Re: Restore Button Module Properties Peter_Albert - Tue Jul 17 04:08:52 EDT 2012
Well I wonder what the perm bool undo (History h, Module m)
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Restore Button Module Properties Peter_Albert - Tue Jul 17 04:10:59 EDT 2012 OK, you asked for the command used in the Object properties dialogue box. This is likely obj."Object Text" = richText hr.oldValue but still you have to get the correct history record as written above.
Greetings,
void restore_Object_History(Object o, int sessNum, string atName){
History h
for h in o do{
if(h.sessionNo == sessNum && h.attrName == atName){
o.atName = richText h.oldValue
}
}
}
Object o = current
restore_Object_History(o,18660,"Object Text")
|
Re: Restore Button Module Properties Mathias Mamsch - Thu Aug 02 05:02:10 EDT 2012
Well I wonder what the perm bool undo (History h, Module m)
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
This one works too. Thanks!!!
void restore_Object_History(Module m, Object o, int sessNum, string atName){
History h
for h in o do{
if(h.type != modifyObject)continue
if(h.sessionNo == sessNum && h.attrName == atName){
//o.atName = richText h.oldValue
bool b = undo(h, m)
//print b
}
}
}
Module m = current
Object o = current
restore_Object_History(m,o,18660,"Proposed Object Text")
|
Re: Restore Button Module Properties Mathias Mamsch - Thu Aug 02 05:02:10 EDT 2012
Well I wonder what the perm bool undo (History h, Module m)
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|